import http from './http.js'
import qs from 'qs'
//列表数据
export function list () {
  return http({
    method: 'GET',
    url: '/manage/user/list',
  })
}
//新增/更新用户
export function addOrUpdateUser (data) {
  return http({
    method: 'post',
    url: '/manage/user/' + (data._id ? 'update' : 'add'),
    data: qs.stringify({ ...data }),
  })
}
//删除用户
export function deleteById (userId) {
  return http({
    method: 'post',
    url: `/manage/user/delete/${userId}`,
  })
}
